package day008.homework;

import java.util.Arrays;
import java.util.Random;

public class Test03 {
    public static void main(String[] args) {
        Random r = new Random();
        int[] A = new int[10];
        int[] B = new int[5];
        for (int i = 0; i < A.length; i++) {
            A[i] = r.nextInt(1, 101);
            if (i % 2 == 0) {
                B[i / 2] = A[i];
            }
        }
        System.out.println(Arrays.toString(A));

        for (int i = 0; i < B.length; i++) {
            System.out.print(B[i] + " ");
        }


    }
}
